<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 

<%--
<div style="margin-bottom:28px;">
   	<c:forEach items="${mainDealViewList.deals}" var="deal" varStatus="status">
   	<c:if test="${status.index eq 0}">
	<div>
		<div class="deal_main">
		    <div style="position:absolute; top:7px; left:7px; z-index:1;">
		    	<a href="javascript:goDeal('${deal.id}', '${deal.providerCode}', '${deal.metaId}');"><img src="${deal.imageUrl1}" width="638" height="377" style="padding-right:7px;"/></a>
		    </div>
		</div>
		<div style="position:absolute;top:0px;left:659px">
			<!-- 두번째 이미지 -->
			<c:forEach items="${mainDealViewList.deals}" var="deal" varStatus="status">
			<c:if test="${status.index eq 1}">
			<%@include file="includeDealTypeC.jsp"%>
			</c:if>
			</c:forEach>
			<!-- 세번째 이미지 -->
			<c:forEach items="${mainDealViewList.deals}" var="deal" varStatus="status">
			<c:if test="${status.index eq 2}">
			<%@include file="includeDealTypeC.jsp"%>
			</c:if>
			</c:forEach>
		</div>
	</div>
   	</c:if>
   	</c:forEach>
</div>
</c:if>
--%>
<%@include file="includeSearchOrder.jsp"%>
<c:if test="${mainDealViewList.size gt 0}">
<table class="tb01" style="width:100%;">
	<tr>
		<c:forEach items="${mainDealViewList.deals}" var="deal" end="1" varStatus="status">
		<c:if test="${status.index eq 0}">
		<td><%@include file="includeDealType2-1.jsp"%></td>
		</c:if>
		</c:forEach>
	</tr>
</table>
</c:if>

<table class="tb01" style="width:100%;">
	<c:forEach items="${searchDealViewList.deals}" var="deal" varStatus="status">
	<c:if test="${(status.index) % 3 eq 0}">
	<tr>
	</c:if>
		<td><%@include file="includeDealTypeA.jsp"%></td>
	<c:if test="${(status.index) % 3 ne 2}">
	<td width="40px"></td>
	</c:if>	
	<c:if test="${(status.index) % 3 eq 2 || status.last}">
	</tr>
	</c:if>
	</c:forEach>
	<c:if test="${searchDealViewList.size eq 0}">
	<tr>
		<td>
			<div style="height:150px;border:5px solid #e4e4e4;text-align:center;padding-top:20px;font-weight:bold;color:#1A1C22">검색된 상품이 없습니다.</div>
		</td>
	</tr>
	</c:if>
</table>
<c:if test="${mainDealViewList.size gt 3}">
<table class="tb01" style="width:100%;">
	<tr>
		<c:forEach items="${mainDealViewList.deals}" var="deal" begin="2" end="3" varStatus="status">
		<c:if test="${status.index eq 2}">
		<td><%@include file="includeDealType2-1.jsp"%></td>
		</c:if>
		</c:forEach>
	</tr>
</table>
</c:if>
<%@include file="includePaging.jsp"%>

